<template>
	<view class="content">
		<view class="register_from">
			<view class="item userName">
				<text>账号</text>
				<input type="text" v-model="query.username"  />
			</view>
			
			<view class="item password">
				<text>密码</text>
				<input type="password" v-model="query.password"  />
			</view>
			
			<view class="item chineseName">
				<text>名字</text>
				<input type="text" v-model="query.chineseName"  />
			</view>
			
			<button type="default" @tap="userRegister()">注册</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				query: {
					username: '',// 账号
					password: '',// 密码
					chineseName: '',// 中文名字
				}
			}
		},
		methods: {
			// 用户注册
			userRegister() {
				this.$Api.User.userRegister(this.query).then(res => {
					console.log(res)
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	page {
		background-color: #f7f7f7;
	}
	.content {
		padding: 20vh 20rpx;
		.register_from {
			background-color: #fff;
			padding: 40rpx 30rpx;
			width: 100%;
			box-sizing: border-box;
			border-radius: 10rpx;
			.item {
				height: 50rpx;
				margin-bottom: 40rpx;
				display: flex;
				text {
					width: 100rpx;
				}
				input {
					width: calc(100% - 100rpx);
					border-bottom: 1px solid #ccc;
				}
			}
		}
		
	}
</style>
